﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<GabageFactory.Models.stack_ardealite_ditch>" %>
<%@ Import Namespace="System.Collections.Generic" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	磷石膏堆积坝（每日）
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="screen_area">
        <form method="Get" action="/Query/Ardealite">
        <div>
        <%if ((bool)ViewData["showFactory"])
            {%>
        请选择公司：<%= Html.DropDownList("factoryId", ViewData["factories"] as List<SelectListItem>, "请选择公司", new { onchange = "showStacks();" })%>
        <span style="margin-left:20px"></span>
        <%
            }
            else
            {
        %>
        <%=Html.Hidden("factoryId", ViewData["factoryId"]) %>
        <%
            }
        %>
        <label>请选择堆场/尾矿库：</label><span id="stackList"><%= Html.DropDownList("stackId", ViewData["stacksAndTailingponds"] as List<SelectListItem>, "请选择")%></span>
        <span style="margin-left:20px"></span>
        <label>查询日期：</label><span><input type="text" name="date" id="date" size="12" value="<%=Model.date.Year %>-<%=Model.date.Month %>-<%=Model.date.Day %>" class="ipt_date" readonly="readonly" /></span>
        <span><input type="submit" value="查  询" /></span>
        </div>
        </form>
    </div>
    <div style="margin-top:10px;margin-bottom:10px"></div>
    <div id="dolphincontainer">
	    <div id="dolphinnav">
	        <ul class="top_tab">
                <li><a href="/Query/StackWater?stackId=<%=ViewData["stackId"]%>&date=<%=Model.date%>&factoryId=<%=ViewData["factoryId"] %>"><span>水位及水质</span></a></li>
                <li><a href="/Query/BackWater?stackId=<%=ViewData["stackId"]%>&date=<%=Model.date%>&factoryId=<%=ViewData["factoryId"] %>"><span>进浆及回水</span></a></li>
                <li><a href="/Query/Settle?stackId=<%=ViewData["stackId"]%>&date=<%=Model.date%>&factoryId=<%=ViewData["factoryId"] %>"><span>沉降及位移</span></a></li>
                <li><a href="javascript:return(false);" class="current"><span>磷石膏堆积坝</span></a></li>
                <li><a href="/Query/Ditch?stackId=<%=ViewData["stackId"]%>&date=<%=Model.date%>&factoryId=<%=ViewData["factoryId"] %>"><span>截洪沟</span></a></li>
                <li><a href="/Query/PiezometerWell?stackId=<%=ViewData["stackId"]%>&date=<%=Model.date%>&factoryId=<%=ViewData["factoryId"] %>"><span>浸润线观测</span></a></li>
                <li><a href="/Query/PiezometerBase?stackId=<%=ViewData["stackId"]%>&date=<%=Model.date%>&factoryId=<%=ViewData["factoryId"] %>"><span>渗压观测</span></a></li>
                <li><a href="/Query/Drain?stackId=<%=ViewData["stackId"]%>&date=<%=Model.date%>&factoryId=<%=ViewData["factoryId"] %>"><span>导渗系统</span></a></li>
	        </ul>
	    </div>
	</div>
    <% 
        DateTime date = Model.date;
        DateTime preDate = date.AddDays(-1);
        DateTime nextDate = date.AddDays(1);
    %>

    <div class="dataarea">
        <a class="arrow_l" href="/Query/Ardealite?stackId=<%=ViewData["stackId"]%>&date=<%=preDate%>&factoryId=<%=ViewData["factoryId"] %>" title="前一天">前一天</a>
        <strong><%= date.Year%>年<%=date.Month%>月<%=date.Day%>日</strong><%if (date.Date < DateTime.Now.Date){ %>
        <a class="arrow_r" href="/Query/Ardealite?stackId=<%=ViewData["stackId"]%>&date=<%=nextDate%>&factoryId=<%=ViewData["factoryId"] %>" title="后一天">后一天</a><%} %>
    </div>
    
    <table cellpadding="4" cellspacing="0" class="com_from_table" style="width:756px;">

        <tr>
            <td class="lab" style="width:164px;">测量人员：</td>
            <td>
                <%
                    User tester = (User) ViewData["tester"];
                    if (tester != null)
                    {
                %>
                <%=tester.RealName + " (" + tester.Name + ")"%>
                <%
                    }
                %>&nbsp;&nbsp;
            </td>
        </tr>
    </table>

    <table cellpadding="4" cellspacing="0" class="com_from_table3" style="width:756px;">
        <tr>
            <th colspan="3">基础数据</th>
        </tr>
        <tr>
            <td style="width:240px;">
                <label class="long">外堤最高点高程：</label>
                <em><%= Model.dyke_top_El%></em>
                <small><%if (Model.dyke_top_El.HasValue) { %> m<%} %></small>
            </td>
            <td style="width:240px;">
                <label class="long">外堤最低点高程：</label>
                <em><%= Model.dyke_bottom_El%></em>
                <small><%if (Model.dyke_bottom_El.HasValue) { %> m<%} %></small>
            </td>
            <td>
                <label class="long">安全超高：</label>
                <em><%= Model.safe_height%></em>
                <small><%if (Model.safe_height.HasValue) { %> m<%} %></small>
            </td>
        </tr>
        <tr>
            <td>
                <label class="long">外堤平均宽度：</label>
                <em><%= Model.dyke_avg_width%></em>
                <small><%if (Model.dyke_avg_width.HasValue) { %> m<%} %></small>
            </td>
            <td>
                <label class="long">环形沟平均宽度：</label>
                <em><%= Model.cycle_groove_avg_width%></em>
                <small><%if (Model.cycle_groove_avg_width.HasValue) { %> m<%} %></small>
            </td>
            <td>
                <label class="long">内堤平均宽度：</label>
                <em><%= Model.inner_dyke_avg_width%></em>
                <small><%if (Model.inner_dyke_avg_width.HasValue) { %> m<%} %></small>
            </td>
        </tr>
        <tr>
            <td>
                <label class="long">堆积坝下游边坡坡度：</label>
                <em><%= Model.dike_downstream_slope_rate%></em>
            </td>
            <td>
                <label class="long">沉积滩最大宽度：</label>
                <em><%= Model.precipitation_beach_max_width%></em>
                <small><%if (Model.precipitation_beach_max_width.HasValue) { %> m<%} %></small>
            </td>
            <td>
                <label class="long">沉积滩最小宽度：</label>
                <em><%= Model.precipitation_beach_min_width%></em>
                <small><%if (Model.precipitation_beach_min_width.HasValue) { %> m<%} %></small>
            </td>
        </tr>
    </table>
    
    <table cellpadding="4" cellspacing="0" class="com_from_table3" style="width:756px;">
        <tr>
            <th colspan="2">其它情况</th>
        </tr>
        <tr>
            <td style="width:240px;">
                <label class="long">是否存在集中渗流（管涌）：</label>
                <%if (Model.is_central_leaked == 1){ %>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:red;font-weight:bold">有</span><%} else if (Model.is_central_leaked == 0) { %>&nbsp;&nbsp;&nbsp;&nbsp;无<%} %>
            </td>
            <td>
                <p><%= Model.central_leaked_desc%></p>
            </td>
        </tr>
        <tr>
            <td>
                <label class="long">是否存在坡面滑动：</label>
                <%if (Model.is_groove_ruined == 1){ %>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:red;font-weight:bold">有</span><%} else if (Model.is_groove_ruined == 0) { %>&nbsp;&nbsp;&nbsp;&nbsp;无<%} %>
            </td>
            <td>
                <p><%= Model.groove_ruined_desc%></p>
            </td>
        </tr>
        <tr>
            <td>
                <label class="long">是否存在边坡或坡脚隆起：</label>
                <%if (Model.is_slope_hunch == 1){ %>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:red;font-weight:bold">有</span><%} else if(Model.is_slope_hunch == 0) { %>&nbsp;&nbsp;&nbsp;&nbsp;无<%} %>
            </td>
            <td>
                <p><%= Model.slope_hunch_desc%></p>
            </td>
        </tr>
        <tr>
            <td>
                <label class="long">是否存在纵向裂缝：</label>
                <%if (Model.is_vertical_break == 1){ %>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:red;font-weight:bold">有</span><%} else if(Model.is_vertical_break == 0) { %>&nbsp;&nbsp;&nbsp;&nbsp;无<%} %>
            </td>
            <td><%= Model.vertical_break_desc%></td>
        </tr>
        <tr>
            <td>
                <label class="long">是否存在横向裂缝：</label>
                <%if (Model.is_horizontal_break == 1) { %>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:red;font-weight:bold">有</span><%} else if (Model.is_horizontal_break == 0) { %>&nbsp;&nbsp;&nbsp;&nbsp;无<%} %>
            </td>
            <td>
                <p><%=Model.horizontal_break_desc%></p>
            </td>
        </tr>

    </table>
    

    <script type="text/javascript" language="javascript">
        $('#date').datepicker({ changeMonth: true, changeYear: true });

        function showStacks() {
            var factoryId = document.getElementById("factoryId").value;
            if (factoryId == "" || factoryId == 0) return;
            $.ajax({ 
                    type: "POST",
                    url: "<%=Url.Content("~/Modification/ListStacks") %>",
                    data: "factoryId=" + factoryId,
                    success: function (data) { $("#stackList").html(data);}
            });
        }
    </script>
</asp:Content>
